package com.neuedu.servce;


import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ProductSevice  {

    @Resource
    JdbcTemplate jdbcTemplate;


    public void transfer(){

        String sql = " UPDATE t_product SET price = price + ? WHERE pid = ? ";
        jdbcTemplate.update(sql ,-100,2);

//        int result = 0/0;

        jdbcTemplate.update(sql ,100,4);



    }


}
